
const { apiPreFix } = require('../config').server
const saler = require('../controllers/saler')
module.exports = (router) => {
  /**
   * 添加销售
   */
  router.get(`${apiPreFix}/saler/create`, async ctx => {
    await saler.create(ctx)
  })
  /**
   * 销售列表
   */
  router.get(`${apiPreFix}/saler/list`, async ctx => {
    await saler.list(ctx)
  })
  /**
   * 删除销售
   */
  router.get(`${apiPreFix}/saler/remove`, async ctx => {
    await saler.remove(ctx)
  })
  /**
   * 更新销售
   */
  router.post(`${apiPreFix}/saler/update`, async ctx => {
    await saler.update(ctx)
  })
}